package com.techshine.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.techshine.entity.Myfile;
import com.techshine.mapper.MyfileMapper;
import com.techshine.service.MyfileService;

 
/** 
 * 说明： 图片
 * 
 */
@Service
public class MyfileServiceImpl implements MyfileService {
	
	@Resource
	private MyfileMapper myfileMapper;
	@Override
	public Myfile queryByKey(String id)throws Exception{
		return myfileMapper.queryByKey(id);
	}
	@Override
	public List<Myfile> queryListByPage(Myfile entity)throws Exception{
		return myfileMapper.queryListByPage(entity);
	}
	@Override
	public List<Myfile> queryList(Myfile entity)throws Exception{
		return myfileMapper.queryList(entity);
	}
	@Override
	public void insert(Myfile entity)throws Exception{
		myfileMapper.insert(entity);
	}
	@Override
	public void insertSelective(Myfile entity)throws Exception{
		 myfileMapper.insertSelective(entity);
	}
	@Override
	public void update(Myfile entity)throws Exception{
	 	myfileMapper.update(entity);
	}
	@Override
	public void updateByKeySelective(Myfile entity)throws Exception{
		 myfileMapper.updateByKeySelective(entity);
	}
	public void delete(Myfile entity)throws Exception{
		 myfileMapper.delete(entity);
	}
	@Override
	public void delmore(String ids) throws Exception {
		// TODO Auto-generated method stub
		String[] split = ids.split(",");
		Myfile node=new Myfile();
		for(String id:split) {
			node.setId(Integer.parseInt(id));
			myfileMapper.delete(node);
		}
	}
	
}

